FROM python:3.7

RUN groupadd -r scrapy && useradd -r -g scrapy scrapy
COPY requirements.txt requirements.txt
RUN /usr/local/bin/python -m pip install --upgrade pip \
    -i https://mirrors.aliyun.com/pypi/simple/
RUN pip install -i https://mirrors.aliyun.com/pypi/simple/ \
    --trusted-host mirrors.aliyun.com \
    -r requirements.txt
COPY ./epaper /epaper
RUN chown -R scrapy:scrapy /epaper
WORKDIR /epaper
USER scrapy

CMD [ "scrapy", "crawl", "rmrb" ]
CMD [ "scrapy", "crawl", "rmrbhwb" ]